#ifndef RECORDDETAILDIALOG_H
#define RECORDDETAILDIALOG_H

#include <QDialog>
#include <QLabel>
#include <QTextEdit>
#include <QPushButton>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QFormLayout>
#include <QGroupBox>
#include <QDialogButtonBox>
#include <QFrame>
#include "databasemanager.h"

QT_BEGIN_NAMESPACE
namespace Ui {
class RecordDetailDialog;
}
QT_END_NAMESPACE

class RecordDetailDialog : public QDialog
{
    Q_OBJECT

public:
    explicit RecordDetailDialog(QWidget *parent = nullptr);
    ~RecordDetailDialog();
    
    // 设置要显示的记录
    void setRecord(const StockRecord& record);

private:
    // 初始化UI
    void setupUI();
    // 加载记录详情
    void loadRecordDetails();
    // 获取物品详细信息
    void loadItemDetails();
    
    Ui::RecordDetailDialog *ui;
    StockRecord m_record;
    ItemInfo m_itemInfo;
};

#endif // RECORDDETAILDIALOG_H